<?php

/***  DOCUMENTATION LAYER

Baffle Class Debugging Test

Last Update: Aug 2007
	
DESCRIPTION
	brief description of script here
	
NOTES
		
***/

$_tx0 = microtime();

// Test Name
$test_name = 'debug ceo fso';

// Include Files
require_once('../fso.class.php');

// Variable Declarations
#$foo = 'bar';

// Simple Test of Class
if ( 1 )
{
  // construct
  $Test = new Fso($debug=1, 'FsoTest');
  $Test->print_d('testing FsoTest -> object constructed');
  
  // read test
  $rpath = '../base.class.php';
  $content = $Test->read($rpath);
  
  // write test
  $wpath = 'test.fso_write.txt';
  if ( $Test->overwrite($wpath, $content) )
    $Test->print_d("write test success -- check $wpath", 'green');
  else
    $Test->print_d("write test failed -- unable to write to $wpath");
  
  // output
  $esc_content = htmlspecialchars($content);
  echo "<pre style='border:1px solid #ccc; padding:1em;'>$esc_content</pre>";
}


// Footer
$_txn = microtime();
$stx = number_format(((substr($_txn,0,9)) + (substr($_txn,-10)) - (substr($_tx0,0,9)) - (substr($_tx0,-10))),4); 
echo "<h6>test '$test_name' complete in $stx s</h6>";

?>
